import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBEngineer/YBBaseRouter/YBApplication.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBColor/YBColor.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBTextStyle/YBTextStyle.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBNetWorkModule/YBAPi/YBAPi.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBJsonToModel/YBWorkTaiModel/YBWorkTaiReMenModel.dart';

import 'YBHuKeFenXiangInfoSubPage.dart';


class YBHuKeWoDeWenZhangSubPage extends StatelessWidget {

  final YBWorkTaiRemenModel MyModel;

  const YBHuKeWoDeWenZhangSubPage({Key key, this.MyModel}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return  Container(
      child: InkWell(
        child: Container(
          height: YBTextStyle.adapterSize90,
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceAround,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Expanded(
                child:Column(
                  mainAxisAlignment: MainAxisAlignment.start,
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Container(
                      child: Text(MyModel.title??"",style: YBTextStyle.TextStyle30313315Semibold,maxLines: 2,),
                    ),
                    Container(
                      height: YBTextStyle.adapterSize15,
                    ),
                    Container(
                      child: YBHuKeFenXiangInfoSubPage(shareNumberStr: MyModel.shareNumber.toString(),),
                    ),
                  ],
                ),
              ),
              Container(
                width: YBTextStyle.adapterSize15,
              ),
              Container(
                  child:ClipRRect(
                    borderRadius: BorderRadius.all(Radius.circular(YBTextStyle.adapterSize8)),
                    child: CachedNetworkImage(imageUrl:MyModel.imageUrl??"",fit: BoxFit.cover,height: YBTextStyle.adapterSize80, width: YBTextStyle.adapterSize80,),
                  ),
              ),
            ],
          ),
        ),
        onTap: () async {
          YBApplication.router.navigateTo(context, '/workTaiPage/workTaiMyInfoDetailPage?id=${MyModel.id}');
        },
      ),
    );
  }
}
